<?php
/**
 * 消息模板
 * Created by PhpStorm.
 * User: yangxiaolin
 * Date: 2017/4/26
 * Time: 15:07
 */

namespace App\Services;


use Illuminate\Support\Facades\Config;

trait MsgTemplate
{
    public function getTpl($tpl){
        $tpls = Config::get('smstemplate.tpls');
        if(!isset($tpls[$tpl]))
            throw new \Exception('模板内容没找到！');
        else{
            return $tpls[$tpl];
        }
    }
}